﻿using UnityEngine;
using System.Collections;

public class Score : MonoBehaviour {

	public static int score;
	public static int scoreSmoothed;
	public static int patrons = 0;
	public static int lives = 3;

	public struct Value {
		public const int Peep = 50;
		public const int Catch = 100;
		public const int LevelWin = 1000;
		public const int Tip = 0;
	}

	public static void add (int value) {
		score += value;
	}

	public static void clear() {
		score = scoreSmoothed = 0;
		patrons = 0;
	}

	public static void addPatron() {
		patrons++;
	}

	// Use this for initialization
	void Start () {
	
	}

	public int ts = 0;
	public int tss = 0;
	// Update is called once per frame
	void Update () {
		int t = 5;
		scoreSmoothed = Mathf.Clamp (score, scoreSmoothed - t, scoreSmoothed + t);
		//Debug.Log (scoreSmoothed);
		ts = score;
		tss = scoreSmoothed;
	}
}
